package cn.com.forever.string;
import java.util.Scanner;

public class StringEncryption {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String[] ss = new String[n];
        for (int i = 0; i < n; i++) {
            ss[i] = sc.next();
        }
        for (int i = 0; i < ss.length; i++) {
            char[] ch = ss[i].toCharArray();
            int[] arr = returnarray(ch.length);
            for (int j = 0; j < ch.length; j++) {
                if((ch[j]+arr[j]) > 122) {
                    int x = (ch[j]+arr[j]-97)%26 + 97;
                    System.out.print((char)x);
                }
                else
                    System.out.print((char)(ch[j]+arr[j]));
            }
            System.out.println();
        }
    }

    public static int[] returnarray(int n){
        int[] array = new int[1000];
        if(n < 0 ){
            return null;
        }
        else {
            array[0] = 1;
            array[1] = 2;
            array[2] = 4;
        }
        for (int i = 3; i < n; i++) {
            array[i] = (array[i-1]+array[i-2]+array[i-3])%26;
        }
//        for (int i = 3; i < n; i++) {
//            array[i] = array[i-1]+array[i-2]+array[i-3];
//        }
        return array;
    }
}
